package com.pubinfo.passbook.common.service.master.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pubinfo.passbook.common.entity.TSystemPermission;
import com.pubinfo.passbook.common.mapper.TSystemPermissionMapper;
import com.pubinfo.passbook.common.model.dto.system.PageParamBase;
import com.pubinfo.passbook.common.model.dto.system.PermissionParam;
import com.pubinfo.passbook.common.service.master.TSystemPermissionService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class TSystemPermissionServiceImpl extends ServiceImpl<TSystemPermissionMapper, TSystemPermission>
    implements TSystemPermissionService {
  @Override
  public IPage<TSystemPermission> listPermissions(PermissionParam param) {
    IPage<TSystemPermission> page = page(param.getPage("create_time"));
    return this.baseMapper.listPermissions(page, param);
  }
}
